home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Ignore the header line
- ;
- IGNORE $FLINE[3 8] = "ORDER#"
- ;
- ; Everything else in the file is handled below
- ;
- BEGIN $FLINE[5 8] <> " "
- ;
- ; This is the start of a customer record
- ;
- SET custcode = $FLINE[10 15]
- TRIM custcode "B" " "
- SET custname = $FLINE[17 47]
- TRIM custname "B" " "
- ;
- ; Output two linefeeds (except at the start of the report)
- ;
- OUTEND leadlf = "Y" |
- OUTEND leadlf = "Y" |
- SET leadlf = "Y"
- ;
- ; Output customer name and customer code
- ;
- APPEND title custname " (" custcode ")"
- SETLEN tlen title
- SET uline = ""
- PAD uline "L" "-" tlen
- OUTEND |{custname} ({custcode})
- OUTEND |{uline}
- ;
- ; Skip the header line
- ;
- READNEXT
- ELSE
- ;
- ; This is the start of a product information line
- ; Extract the product code and (on the next line) the product name
- ;
- SET prodcode = $FLINE[10 19]
- READNEXT
- SET prodname = $FLINE[10 60]
- TRIM prodname "B" " "
- ;
- ; Output this item if the code doesn't contain "-30-"
- ;
- OUTEND prodcode ~ "-30-" |{prodcode} {prodname}
- END
-
-